{extend name="main"}

{block name="button"}

{/block}

{block name="content"}
<form onsubmit="return false;" data-auto="true" action="{:url('save')}" method="post" class='layui-form layui-card' autocomplete="off">
    <div class="layui-card padding-20 shadow">
        <div class="layui-card-header notselect">
            <b>公司信息</b>
        </div>
        <div class="layui-card-body">
            <div class="layui-form-item">
                <span class="color-green font-w7">公司名称</span>
                <label class="relative block">
                    <input name="company_name" value="{:sysconf('company_name')}" class="layui-input layui-bg-gray">
                </label>
                <div class="help-block"></div>
            </div>
            <div class="layui-form-item">
                <span class="color-green font-w7">成立时间</span>
                <label class="relative block">
                    <input id="time" name="company_establish_time" value="{:sysconf('company_establish_time')}" class="layui-input layui-bg-gray">
                </label>
                <div class="help-block"></div>
            </div>
            <div class="layui-form-item">
                <span class="color-green font-w7">公司介绍</span>
                <label class="relative block">
                    <textarea class="layui-textarea" name="company_desc" placeholder="请输入文章内容">{:sysconf('company_desc')}</textarea>
                </label>
                <div class="help-block"></div>
            </div>
        </div>
        <div class="layui-form-item text-center padding-bottom-10">
            {if auth("save")}
            <button class="layui-btn" type="submit">保存</button>
            {/if}
        </div>
    </div>
</form>

<script>
    require(['ckeditor'], function () {
        window.createEditor('[name=company_desc]', {height: 400});
    });

    layui.use('laydate', function(){
        var laydate = layui.laydate;
        laydate.render({
            elem: '#time',
            type: 'datetime'
        });
    });
</script>
{/block}